<%@page contentType="text/html;charset=utf-8" pageEncoding="UTF-8" %>
<%@taglib prefix="h" uri="http://struts.apache.org/tags-html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="b" uri="http://struts.apache.org/tags-bean" %>

<h1><b:message key="types_create"/></h1>
<div>
    <h:form action="/protected/type?method=${param['method']}">
        <table border="0">
            <tr>
                <td><span class="important"><b:message key="types_name"/></span></td>
                <td><h:text property="name" size="100" maxlength="512"/><span class="error" ><h:errors property="name" /></span></td>
            </tr>
            <tr>
                <td><b:message key="gen_note"/></td>
                <td><h:textarea property="note" cols="100" rows="10"/></td>
            </tr>

        </table>

        <c:if test="${param['method'] == 'showCreateTypeForm'}">
            <h:submit property="submit"><b:message key="gen_create"/></h:submit>
        </c:if>

        <c:if test="${param['method'] == 'showUpdateTypeForm'}">
            <h:submit property="submit"><b:message key="gen_update"/></h:submit>
        </c:if>

        <h:cancel><b:message key="gen_cancel"/></h:cancel>
    </h:form>
</div>
